package com.mmall.controller.admin;

import com.mmall.common.ServerResponse;
import com.mmall.service.UserService;
import com.wordnik.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping(value="/manager/user")
public class UserManagerController {

    @Autowired
    private UserService userService;

    @ApiOperation(value = "删除用户信息", notes = "删除用户", httpMethod = "DELETE", produces = MediaType.APPLICATION_JSON_VALUE)
    @RequestMapping(value = "deleteUser.do")
    @ResponseBody
    public ServerResponse delete(@RequestParam("userid") Integer userid) {
        userService.deleteUser(userid);
        return  userService.deleteUser(userid);
    }


}
